
// 对一些微信接口的promise，异步都改成同步格式写法了



function getSetting(){
  return new Promise(function (resolve, reject) {
    wx.getSetting({
      success: resolve
    })
  })
}



function getUserInfo(){
  return new Promise(function (resolve, reject) {
    wx.getUserInfo({
      success: resolve
    })
  })
}




function login(){
  return new Promise((resolve, reject)=>{
    wx.login({
      success: resolve
    })
  })
}



module.exports ={
  getSetting,login, getUserInfo
}